class Electeur < ActiveRecord::Base
	has_many :votes, :dependent => :destroy
  has_many :commentaires, :dependent => :destroy
  has_one :user, :as => :compte
  accepts_nested_attributes_for :user, :allow_destroy => true
  validates_associated :user
	validates_presence_of :nom, :prenom, :naissance, :departement, :sexe
end
